package registration;

import msg.EventMessage;

import common.interfaces.AbstractHasID;

/**
 * A question asked of an event, that all participants must reach a consensus on
 * 
 * @author Gal Lalouche
 */
public class Consensus extends AbstractHasID<Long> {
	private final long			id;
	private final String		name;
	private final EventMessage	event;
	
	Consensus(long id, String name, EventMessage event) {
		super();
		this.id = id;
		this.name = name;
		this.event = event;
	}
	
	@Override
	public Long getId() {
		return id;
	}
	
	/**
	 * @return The name of the consensus
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * @return The event that consensus was asked on
	 */
	public EventMessage getEvent() {
		return event;
	}
}
